class Bonus {
public:
    int getMost(vector<vector<int> > board) {
        int maxval[6][6] = {0};
        maxval[0][0] = board[0][0];
        // 初始化 0行，0列
        for(int i = 1; i < board.size(); ++i){
            maxval[0][i] = maxval[0][i-1] + board[0][i];
            maxval[i][0] = maxval[i-1][0] + board[i][0];
        }
        for(int i = 1; i < board.size(); ++i){
            for(int j = 1; j < board.size(); ++j){
                // 该点最大总价值 = max(上面点最大总价值，左边点的最大总价值) + 当前价值
                    maxval[i][j] = board[i][j] + max(maxval[i-1][j], maxval[i][j-1]);
            }
        }
        return maxval[5][5];
    }
};